package com.gzs.learn.springcloud.mapstruct;

import com.gzs.learn.springcloud.dto.AddressDto;
import com.gzs.learn.springcloud.entity.Address;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface AddressMS {
    AddressMS INSTANCE = Mappers.getMapper(AddressMS.class);

    AddressDto toDto(Address address);

    Address fromDto(AddressDto addressDTO);

    List<AddressDto> toList(List<Address> addresses);

    List<Address> fromDto(List<AddressDto> addressDTOs);
}
